/*
 * @Date: 2020-08-06 14:04:23
 * @LastEditors: xujianxing
 * @LastEditTime: 2020-08-06 16:58:50
 * @FilePath: \my-nextjs\pages\signin\index.tsx
 */
import React, { useRef, RefObject } from "react";
import { NextPage } from "next";
import { Form, Input, Button } from "antd";

import cls from "classnames";

import style from "./index.module.scss";
const layout = {
  labelCol: { span: 4 },
  wrapperCol: { span: 16 },
};
const Signin: NextPage = () => {
  /**
   * and 4.x form instance
   */
  const [form] = Form.useForm();

  /**
   * countdown ref instance
   */
  const countRef = useRef<null | any>();

  const signin = (values) => {};

  return (
    <div className={cls(style.wrapper, "container")}>
      <div className={style.formBox}>
        <Form {...layout} form={form} onFinish={signin}>
          <Form.Item
            label="用户名"
            name="name"
            rules={[
              {
                required: true,
                message: "Please input your nickname",
              },
            ]}
          >
            <Input size="large" />
          </Form.Item>
          <Form.Item
            label="密码"
            name="password"
            rules={[
              {
                required: true,
                message: "Please input your nickname",
              },
            ]}
          >
            <Input size="large" />
          </Form.Item>

          <Form.Item>
            <Button size="large" htmlType="submit">
              登陆
            </Button>
          </Form.Item>
        </Form>
      </div>
    </div>
  );
};

export default Signin;
